<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>固件程序管理管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/source/program/eleSourceProgram/"><spring:message code="menu.firmware.list"/></a></li>
		<shiro:hasPermission name="source:program:eleSourceProgram:edit">
			<li><a href="${ctx}/source/program/eleSourceProgram/form"><spring:message code="menu.firmware.add"/></a></li>
		</shiro:hasPermission>
	</ul>
	<form:form id="searchForm" modelAttribute="eleSourceProgram" action="${ctx}/source/program/eleSourceProgram/" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<ul class="ul-form">
		<c:if test="${language == 'zh'}">
			<li><label><spring:message code="common.app.type"/>：</label>
				<form:select path="type" >
					<form:options items="${fns:getDictList('programtype')}" itemLabel="label" itemValue="value" htmlEscape="false" class="input-medium"/>
				</form:select>
			</li>
			</c:if>
			<c:if test="${language == 'en'}">
			<li><label><spring:message code="common.app.type"/>：</label>
				<form:select path="type" >
					<form:options items="${fns:getDictList('programtype')}" itemLabel="enlabel" itemValue="value" htmlEscape="false" class="input-medium"/>
				</form:select>
			</li>
			</c:if>
			<li><label><spring:message code="common.versionname"/>：</label>
				<form:input path="name" htmlEscape="false" maxlength="50" class="input-medium"/>
			</li>
			
			<li class="btns"><input id="btnSubmit" class="btn btn-primary" type="submit" value="<spring:message code='common.Query'/>"/></li>
			<li class="clearfix"></li>
		</ul>
	</form:form>
	<sys:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed" >
		<thead>
			<tr>
				<th style="min-width: 6em"><spring:message code="common.app.type"/></th>
				<th style="min-width: 16em"><spring:message code="common.versionname"/></th>
				<th style="min-width: 6em"><spring:message code="common.version"/></th>
				<th style="min-width: 12em"><spring:message code='common.createtime'/></th>

				<shiro:hasPermission name="source:program:eleSourceProgram:edit"><th  style="min-width: 10em"><spring:message code='common.operation'/></></shiro:hasPermission>
				<th><spring:message code="common.remarks"/></th>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${page.list}" var="eleSourceProgram">
			<tr>
				<td>
					${fns:getDictLabel(eleSourceProgram.type, 'programtype', '')}
				</td>
				<td>
					${eleSourceProgram.name}
				</td>
				<td>
					${eleSourceProgram.version}
				</td>
				
				<td>
					<fmt:formatDate value="${eleSourceProgram.createDate}" pattern="yyyy-MM-dd HH:mm:ss"/>
				</td>

				<shiro:hasPermission name="source:program:eleSourceProgram:edit"><td>
    				<a href="${ctx}/source/program/eleSourceProgram/form?id=${eleSourceProgram.id}"><spring:message code="common.modify"/></a>
					<a href="${ctx}/source/program/eleSourceProgram/applypublish?id=${eleSourceProgram.id}"><spring:message code="publish"/></a>
					<a href="${ctx}/source/program/eleSourceProgram/delete?id=${eleSourceProgram.id}" onclick="return confirmx('<spring:message code="tips.deleteconfirm"/>？', this.href)"><spring:message code="common.delete"/></a>
				</td></shiro:hasPermission>
				<td>
						${eleSourceProgram.remarks}
				</td>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>